<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateInformTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('inform', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('inform_type')->comment('通知消息类型:door/rfid');
			$table->integer('shop_id')->comment('超市id');
			$table->integer('way_type')->nullable()->comment('1:入口  2:出口');
			$table->string('door_type')->nullable()->comment('A或者B');
			$table->integer('door_state')->nullable()->comment('1:开门  2:关门');
			$table->integer('scan_state')->nullable()->comment('扫描状态  1：扫描到人  2：人走了');
			$table->string('ip', 22)->nullable()->comment('发送通知的ip地址');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('inform');
	}

}
